#python文件&文件夹工具类
import os
fromBase = "/home/logs/backupLogs/2012/08/12"
uvs = set()
for fatherroot, fatherdirs, fatherfiles in os.walk(fromBase):
    for fatherfile in fatherfiles:
        eachFile = os.path.join(fromBase,fatherfile)
        f = open(eachFile)
        for eachLine in f:
            infos = eachLine.split("#")
            if(len(infos)>=4):
                if infos[1] not in uvs:
                    uvs.add(infos[1])
        f.close()
print "uv is :" +str(len(uvs))